package lec04.am.v4;
interface CanCry{
	void cry();
}
interface CanSing{
	void sing();
	
}
interface CandDance{
	void dance();
	
}
interface CandSingAndDance extends CandDance,CanSing
{
	
}
class Android implements CandSingAndDance{

	@Override
	public void dance() {
		System.out.println("Android.dance()");
		
	}

	@Override
	public void sing() {
		System.out.println("Android.sing()");
		
	}
	
}
class Baby implements CanSing,CanCry{

	@Override
	public void cry() {
		System.out.println("Baby.cry()");		
	}

	@Override
	public void sing() {
		System.out.println("Baby.sing()");		
	}	
}
public class Demo {
	public static void main(String[] args) {
		CanSing[] singers=new CanSing[2];
		//new Cansing();
		singers[0]=new Android();
		singers[1]=new Baby();
		for(CanSing curSinger:singers)
			curSinger.sing();
		
	}
}
